//package com.nari.ncps.screen.config.datasource;
//
//
//import com.nari.ncps.screen.utils.GlobalDataSourceState;
//import jakarta.annotation.Resource;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
//
//@Slf4j
//public class DynamicDataSource extends AbstractRoutingDataSource {
//
//
//
//    @Resource
//    private GlobalDataSourceState dataSourceState;
//
//
//    @Override
//    protected Object determineCurrentLookupKey() {
//
//        //要用全局的变量
//        log.info("当前数据源{}", dataSourceState.getCurrentDataSource() );
//        return dataSourceState.getCurrentDataSource();
//
//    }
//
//}
